home *** CD-ROM | disk | FTP | other *** search
- Path: li.net!jeremy
- From: jeremy@newshost.li.net (Jeremy Markman)
- Newsgroups: comp.lang.c
- Subject: Re: string search?
- Date: 28 Mar 1996 14:29:15 GMT
- Organization: LI Net (Long Island Network)
- Message-ID: <4je7nr$91u@linet06.li.net>
- References: <4jbmtk$78k@dfw-ixnews3.ix.netcom.com>
- NNTP-Posting-Host: linet04.li.net
- X-Newsreader: TIN [version 1.2 PL2]
-
- Ricardo Mor (rmor1@ix.netcom.com) wrote:
- : How can I search for a string of characters within another string?
- : for example..
-
- Which compiler are you using? Borland comes with a library function
- strstr() that will do just that. I don't know if other compilers have
- such a function...
-
- useage:
- char *strstr(char *string1, char *string2)
-
- will return a pointer in string1 where the first occurrence of string2
- begins. will return NULL if string2 does not occur in string1.
-